<?php
namespace app\index\controller;
use think\Controller;
use think\Request;
class Error extends controller
{
    public function index(Request $request)
    {
        //根据当前控制器名来判断要执行那个城市的操作
        $cityName = $request->controller();
        return $this->city($cityName);
    }

    protected function city($name)
    {
        //和$name这个城市相关的处理
        return '当前城市' . $name;
    }

    public function _empty($name){
        echo $name;
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }
}
